﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using StructureMap.Configuration.DSL;
using Universum.Model.Services.Classes;
using Universum.Model.Services.MyClasses;
using Universum.Model.Services.Indexing;

namespace Universum.Infrastructure.Configuration
{
	public class ClassesRegistry : Registry
	{
		public ClassesRegistry()
		{
			ForRequestedType<IClassesService>()
				.TheDefaultIsConcreteType<ClassesServiceImpl>();
			ForRequestedType<IPageArticleService>()
				.TheDefaultIsConcreteType<PageArticleServiceImpl>();
			ForRequestedType<IPageGroupService>()
				.TheDefaultIsConcreteType<PageGroupServiceImpl>();
			ForRequestedType<ILabWorkArticleService>()
				.TheDefaultIsConcreteType<LabWorkArticleServiceImpl>();
			ForRequestedType<ISignupService>()
				.TheDefaultIsConcreteType<SignupServiceImpl>();
			ForRequestedType<ISubmissionService>()
				.TheDefaultIsConcreteType<SubmissionServiceImpl>();
			ForRequestedType<ITeacherArticleIndexingService>()
				.TheDefaultIsConcreteType<TeacherArticleIndexingServiceImpl>().CacheBy(StructureMap.Attributes.InstanceScope.PerRequest);
			
		}
	}
}
